/* Copyright [2023] <gyl> */
#pragma once

#include <memory>
#include <vector>

#include "sql/operator/logical_operator.h"
#include "sql/parser/parse_defs.h"

class AggrLogicalOperator : public LogicalOperator {
 public:
  explicit AggrLogicalOperator(std::vector<AggregateUnit> aggregations);
  virtual ~AggrLogicalOperator() = default;

  LogicalOperatorType type() const override {
    return LogicalOperatorType::AGGR;
  }
  std::vector<AggregateUnit> aggregations() { return aggregations_; }

 private:
  std::vector<AggregateUnit> aggregations_;
};
